<?php
namespace app\index\model;
use app\common\model\Base;

class PayNow extends Base
{
    //微信转账
    public function wxTransferAccounts($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xxlist px','pn.idie_xx_wx=px.id')
                ->field('pn.*,px.id,px.xx_bankico')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
    //支付宝转账
    public function aliTransferAccounts($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xxlist px','pn.idie_xx_zfb=px.id')
                ->field('pn.*,px.id,px.xx_bankico')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
    //银行转账
        public function bankTransferAccounts($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xxlist px','pn.idie_xx_wy=px.id')
                ->field('pn.*,px.id,px.xx_bankico')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
    //第三方微信
    public function wxPay($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xianshang px','pn.idie_dsf_wx=px.id')
                ->field('pn.*,px.id,px.pay_name')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
    //第三方支付宝
    public function aliPay($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xianshang px','pn.idie_dsf_zfb=px.id')
                ->field('pn.*,px.id,px.pay_name')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
    //第三方银行
    public function bankPay($us_class) {
        $res = PayNow::name('pay_now')->alias('pn')
                ->join('pay_xianshang px','pn.idie_dsf_wy=px.id')
                ->field('pn.*,px.id,px.pay_name')
                ->where('idie_us_class',$us_class)
                ->select()->toArray();
        return $res;
    }
    
}